<template>
  <div class="about">
    <div class="web">
      <img src="../assets/Share/banner.png" style="width: 100%" />
      <div class="nav">
        <div
          class="item"
          v-for="item in navList"
          :key="item.id"
          @click="$router.push(item.router)"
          :class="{ active: item.router === $route.fullPath }"
        >
          {{ item.title }}
        </div>
      </div>
      <div class="main">
        <router-view />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      navList: [
        { title: "企业简介", id: 1, router: "/about" },
        { title: "企业文化", id: 2, router: "/about-culture" },
        { title: "集团战略", id: 3, router: "/about-strategy" },
        { title: "社会分享", id: 4, router: "/about-sharing" },
        { title: "人才招聘", id: 5, router: "/about-recruitment" },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.about {
  .web {
    .nav {
      width: 700px;
      border-bottom: 1px solid #e5e5e5;
      height: 86px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 250px;
      margin: 0 auto;
      .item {
        cursor: pointer;
        font-weight: bold;
      }
      .active {
        color: #00a4ff;
      }
    }
    .main {
      width: 1200px;
      margin: 0 auto;
    }
  }
}
</style>